<?php  if ( ! defined('ACCESS')) exit('No direct script access allowed');
	
	$conn = mysql_connect($dbhost, $dbuser, $dbpass);
	if (!$conn) {
	    die('Could not connect: ' . mysql_error());
	}
	mysql_select_db($dbname);
	
	function result_query($query){
		if (!$result = mysql_query($query)) {
	    	return FALSE;
		}else{
			$data=null;
			while ($row = mysql_fetch_row($result)){
				$data []= $row;
			}
			return $data;
		}
	}
?>